<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <base th:href="${#request.getContextPath() + '/'}"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>
    <!-- Invalid Stylesheet. This makes stuff look pretty. Remove it if you want the CSS completely valid -->
    <!-- Reset Stylesheet -->
    <link rel="stylesheet" href="resources/css/reset.css" type="text/css"
          media="screen" />
    <!-- Main Stylesheet -->
    <link rel="stylesheet" href="resources/css/style.css" type="text/css"
          media="screen" />
    <link rel="stylesheet" href="resources/css/invalid.css" type="text/css"
          media="screen" />

    <!--                       Javascripts                       -->
    <!-- jQuery -->
    <script type="text/javascript"
            src="resources/scripts/jquery-1.3.2.min.js"></script>
    <!-- jQuery Configuration -->
    <script type="text/javascript"
            src="resources/scripts/simpla.jquery.configuration.js"></script>
</head>
<body>
<div id="main-content">
    <div class="content-box">
        <!-- End .content-box-header -->
        <div class="content-box-content">
            <div class="tab-content default-tab" id="tab1">
                <table>
                    <thead>
                    <tr>
                        <th><input class="check-all" type="checkbox" /></th>
                        <th>标题</th>
                        <th>类型（是否为秒杀商品）</th>
                        <th>图片</th>
                        <th>描述</th>
                        <th>价格</th>
                        <th>库存</th>
                        <th>操作</th>
                    </tr>
                    </thead>

                    <tbody>
                        <!-- 每个商品就是一行 也就是一个tr -->
                        <!-- <c:forEach item="${xxx}" var="a"> -->
                        <tr th:each="goods : ${goodsList}">
                            <td><input type="checkbox" /></td>
                            <td th:text="${goods.subject}">Lorem ipsum dolor</td>
                            <td th:text="${goods.type == 0 ? '普通商品' : '秒杀商品'}">Lorem ipsum dolor</td>
                            <td><img style="width: 160px; height: 120px" th:src="${goods.images}"/></td>
                            <td th:text="${goods.info}">Lorem ipsum dolor</td>
                            <td th:text="${#numbers.formatCurrency(goods.price)}">Lorem ipsum dolor</td>
                            <td th:text="${goods.save}">Lorem ipsum dolor</td>
                            <td>
                                <a href="#" title="Edit"><img
                                    src="resources/images/icons/pencil.png" alt="Edit" /></a> <a
                                    href="#" title="Delete"><img
                                    src="resources/images/icons/cross.png" alt="Delete" /></a> <a
                                    href="#" title="Edit Meta"><img
                                    src="resources/images/icons/hammer_screwdriver.png"
                                    alt="Edit Meta" /></a>
                            </td>
                        </tr>
                    </tbody>

                    <tfoot>
                    <tr>
                        <td colspan="6">
                            <div class="bulk-actions align-left">
                                <a class="mybutton" href="/goodsInsert">添加商品</a>
                            </div>
                            <div class="clear"></div>
                        </td>
                    </tr>
                    </tfoot>
                </table>
            </div>
        </div>
        <!-- End .content-box-content -->
    </div>
</div>
<!-- End #main-content -->
</body>
</html>